import { CopyConfig } from "../../../resource/CopyConfig";
import { CopyUtil } from "../CopyUtil";
import { Language } from "../../../../../extend/language/Language";
import { TCopy } from "../../../../../Message/Db/Tables/TCopy";
type int = number;
//class EliteTowerFloorData
    
    export  class EliteTowerFloorData
    {
        constructor()
        {
            
            this._rewardItems = [];
            this.maps = [];
            return;
        }

        public set copyCode(arg1: int)
        {
            this._copyCode = arg1;
            this._tcopy = CopyConfig.instance.getInfoByCode(arg1);
            if (this._tcopy) 
            {
                this.label = this._tcopy.name;
                this._rewardItems = CopyUtil.getCopyRewards(this._tcopy);
            }
            return;
        }

        public set opened(arg1: Boolean)
        {
            this._opened = arg1;
            if (this._opened) 
            {
                this.name = Language.getStringByParam(60660, this.floor);
            }
            else 
            {
                this.name = Language.getStringByParam(60661, this.floor);
            }
            return;
        }

        public get opened(): Boolean
        {
            return this._opened;
        }

        public get rewardItems(): Array<any>
        {
            return this._rewardItems;
        }

        public get copyCode(): int
        {
            return this._copyCode;
        }

        public get copyName(): string
        {
            if (this._tcopy) 
            {
                return this._tcopy.name;
            }
            return "";
        }

        public get maxPlayerNum(): int
        {
            if (this._tcopy) 
            {
                return this._tcopy.maxPlayer;
            }
            return 0;
        }

        public /* var */selected: Boolean;

        public /* var */floor: int;

        public /* var */reach: Boolean;

        /* internal */ /* var */_opened: Boolean;

        /* internal */ /* var */_copyCode: int;

        /* internal */ /* var */_tcopy: TCopy;

        /* internal */ /* var */_rewardItems: Array<any>;

        public /* var */name: string="还没设置开启";

        public /* var */label: string="";

        public /* var */icon: string="";

        public /* var */maps: Array<any>;
    }
